package com.bawei.demo_shoppingcar.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import static android.R.attr.version;

/**
 * Created by HP on 2017/3/22.
 */

public class ShoppingDBHelper extends SQLiteOpenHelper {

    public ShoppingDBHelper(Context context) {
        super(context, "shopping_db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        db.execSQL("create table if not exists shoppingcar(id_ integer primary key AUTOINCREMENT," +
                "name_ varchar,price_ double,num_ smallint,image_ varchar)");

    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
